<!DOCTYPE html>
<html lang="en">
<head>
    <meta charset="UTF-8">
    <meta http-equiv="X-UA-Compatible" content="IE=edge">
    <meta name="viewport" content="width=device-width, initial-scale=1.0">
    <link rel="stylesheet" href="./css/bootstrap.min.css">
    <title>Document</title>
    <style>
        body{
            background-color: rgb(28, 8, 100);
        }
        .box{
            float: left;
            margin: 0px 5px;
            list-style: none;
        }
        .box img{
            border: 1px solid white;
            width: 150px;
            height: 300px;
        }
        .box img:nth-child(2){
            width: 400px;
            height: 300px;
        }
        .addWidth{
            margin: 0px ;
        }
    </style>
</head>
<body>
    <script src="./js/jquery.min.js"></script>

    <div class="">
        <ul class="">
            <li class="box"><img src="./imgs/京剧01.png" ><img src="./imgs/carton.png" alt=""></li>
            <li class="box"><img src="./imgs/京剧02.png" ><img src="./imgs/carton.png" alt=""></li>
            <li class="box"><img src="./imgs/京剧03.png" ><img src="./imgs/carton.png" alt=""></li>
            <li class="box"><img src="./imgs/京剧04.png" ><img src="./imgs/carton.png" alt=""></li>
            <li class="box"><img src="./imgs/京剧05.png" ><img src="./imgs/carton.png" alt=""></li>
            <li class="box"><img src="./imgs/京剧06.png" ><img src="./imgs/carton.png" alt=""></li>
        </ul>
       
    </div>

<script>
    $(function(){

        let len = $('li').length;
       for (var i = 0; i < len ; i++){

        $('li').eq(i).children('img').eq(1).hide();

           $('li').eq(i).hover(function() {

               $(this).children('img').eq(0).hide();
               $(this).children('img').eq(1).show();
             
           },function() {
                $(this).children('img').eq(1).hide();
                $(this).children('img').eq(0).show();
           })
       }
        
    })
        
</script>
</body>
</html>